import 'package:json_annotation/json_annotation.dart';

part 'git_tree_item.g.dart';

@JsonSerializable()
class GitTreeItem {
  final String path;
  final String mode;
  final String type;
  final String sha;
  final int size;
  final String url;

  GitTreeItem({
    required this.path,
    required this.mode,
    required this.type,
    required this.sha,
    required this.size,
    required this.url,
  });

  factory GitTreeItem.fromJson(Map<String, dynamic> json) =>
      _$GitTreeItemFromJson(json);
  Map<String, dynamic> toJson() => _$GitTreeItemToJson(this);
}
